package com.student_exam_system.dao;

import com.student_exam_system.pojo.UserPaper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserPaperMapper {
    /**添加一个UserPaper
     * @param userPaper 传入userPaper类
     * @return int
     */
    int addUserPaper(UserPaper userPaper);
    /**根据id删除一个UserPaper
     * @param id 传入id
     * @return int
     */
    int deleteUserPaperById(int id);

    /**更新UserPaper
     * @param userPaper 传入userPaper类
     * @return int
     */
    int updateUserPaper(UserPaper userPaper);

    /**更新UserPaper
     * @param upPaper 传入upPaper
     * @param classId 传入classId
     * @return int
     */
    int updateUserPaperByPaperAndUser(@Param("upPaper") int upPaper,@Param("classId") int classId);

    /**根据id查询,返回一个UserPaper
     * @param id 传入id
     * @return int
     */
    UserPaper queryUserPaperById(int id);
    /**查询全部UserPaper,返回list集合
     * @return List<UserPaper>
     */
    List<UserPaper> queryAllUserPaper();

}
